import request from '@/utils/request'

export function fetchPrdProdList(query) {
  return request({
    url: '/prd_prod_dict/page',
    method: 'get',
    params: query
  })
}

export function createPrdProd(data) {
  return request({
    url: '/prd_prod_dict',
    method: 'post',
    data
  })
}

export function updatePrdProd(data) {
  return request({
    url: `/prd_prod_dict/${data.id}`,
    method: 'put',
    data
  })
}

export function deletePrdProd(id) {
  return request({
    url: `/prd_prod_dict/${id}`,
    method: 'delete'
  })
}

export function changePrdProdStatus(data) {
  return request({
    url: `/prd_prod_dict/${data.id}`,
    method: 'put',
    data
  })
}
